package ding.fram;

import ding.utils.ExcelUtils;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;

//名称的分组
public class Group {

    private List<String> names = new ArrayList<>();

    private Map<String, ExcelUtils.NameValueMaker> nameValueMakerMap;

    private ExcelUtils.CannotMappingHandler cannotMappingHandler;

    private KVHandler kvHandler;

    public KVHandler getKvHandler() {
        return kvHandler;
    }

    public void setKvHandler(KVHandler kvHandler) {
        this.kvHandler = kvHandler;
    }

    public void setCannotMappingHandler(ExcelUtils.CannotMappingHandler cannotMappingHandler) {
        this.cannotMappingHandler = cannotMappingHandler;
    }

    public ExcelUtils.CannotMappingHandler getCannotMappingHandler() {
        return cannotMappingHandler;
    }

    public void setNameValueMakerMap(Map<String, ExcelUtils.NameValueMaker> nameValueMakerMap) {
        this.nameValueMakerMap = nameValueMakerMap;
    }

    public Map<String, ExcelUtils.NameValueMaker> getNameValueMakerMap() {
        return nameValueMakerMap;
    }

    //可以添加多个名称
    public void add(String... n) {
        names.addAll(Arrays.asList(n));
    }

    public List<String> getNames() {
        return names;
    }


}
